package com.shopping.mall.core.module.company.service;

import com.shopping.mall.base.http.Result;
import com.shopping.mall.core.module.company.entity.Company;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shopping.mall.base.http.Result;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * Company服务类
 * </p>
 *
 * @author zzy
 * @date 2021-09-02
 */
public interface CompanyService extends IService<Company> {

    Result<Object> last();

    /**
    * 分页查询
    * @param current：页码
    * @param size：每页条数
    * @param company：筛选条件
    * @return IPage<Company>
    */
    IPage<Company> getCompanyPage(Integer current,Integer size,Company company);

    /**
    * 查询所有
    * @param company：筛选条件
    * @return List<Company>
    */
    List<Company> getAll(Company company);

    /**
    * 通过id删除
    * @param id：companyId
    * @return Result<Object>
    */
    Result<Object> deleteById(String id);

    /**
    * 批量删除
    * @param ids：id列表
    * @return Result<Object>
    */
    Result<Object> batchDelete(List<String> ids);
}
